PROJECT( wxSeanApp )

CMAKE_MINIMUM_REQUIRED(VERSION 2.4)

SET(WX_SEAN_APP_VERSION "1.0")
SET(CMAKE_FIND_LIBRARY_PREFIXES "")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
SET(wxWidgets_USE_LIBS base core net)

OPTION(COMMUNITY_PORTAL "Add Community Support" ON)
OPTION(USER_UPLOAD "Add User Upload capabilities" ON)
OPTION(BUILTIN_BROWSER "Add the Built-in Browser Support" ON)

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.cmake
	${CMAKE_BINARY_DIR}/config.h)

SET(SRCS 
	frame.cpp
	main.cpp
	menu.cpp 
	window.cpp
)

SET(HDRS
	enum.h
	events.h
	frame.h
	main.h
	menu.h 
	window.h 
)


FIND_PACKAGE(wxWidgets)
 
IF(wxWidgets_FOUND)

	INCLUDE(
		${wxWidgets_USE_FILE}
	)

	INCLUDE_DIRECTORIES(
		${CMAKE_SOURCE_DIR}
		${CMAKE_BINARY_DIR}
		${wxWidgets_INCLUDE_DIRS}
	)

	IF(WIN32)
		SET(GUI_TYPE WIN32)
		SET(SRCS ${SRCS} wxSean.rc)
		#SET(CMAKE_CONFIGURATION_TYPES Release)
	ELSE(WIN32)
		IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
			SET(MACOSX_BUNDLE_INFO_STRING "")
			SET(MACOSX_BUNDLE_ICON_FILE "${wxSeanApp_SOURCE_DIR}/wxSean.icns")
			SET(MACOSX_BUNDLE_GUI_IDENTIFIER "")
			SET(MACOSX_BUNDLE_LONG_VERSION_STRING "")
			SET(MACOSX_BUNDLE_BUNDLE_NAME "${PROJECT_NAME}")
			SET(MACOSX_BUNDLE_SHORT_VERSION_STRING "")
			SET(MACOSX_BUNDLE_BUNDLE_VERSION "${WX_SEAN_APP_VERSION}")
			SET(MACOSX_BUNDLE_COPYRIGHT "Copyright 2008 Sean Nelson")
			#SET_SOURCE_FILES_PROPERTIES(apple1_aux1 PROPERTIES MACOSX_PACKAGE_LOCATION MacOSX)
			#SET_SOURCE_FILES_PROPERTIES(apple1_res1 PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
			SET(GUI_TYPE MACOSX_BUNDLE)
		ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
	ENDIF(WIN32)

	ADD_EXECUTABLE(wxSeanApp ${GUI_TYPE} ${SRCS} ${HDRS})
	TARGET_LINK_LIBRARIES(wxSeanApp ${wxWidgets_LIBRARIES} )
 
ELSE(wxWidgets_FOUND)
	MESSAGE("wxWidgets not found!")
ENDIF(wxWidgets_FOUND)
